<?php
import('Cache.~');
/**
 * IndexController
 *
 * @package
 * @author darche
 * @copyright Copyright (c) 2009
 * @version $Id$
 * @access public
 */
class VideosController extends Hoa_Controller_Action_Standard {

	public function IndexAction(){
		# Gestion du cache
		$frontendOptions = array(
			'lifetime' => 600
		);
		$backendOptions = array(
			'cache_directory' => $this->config->rep->cacheDirectory.'/'
		);
		$cache = Hoa_Cache::factory('Class', 'File', $frontendOptions, $backendOptions);
		$cache->setObject('PlayersVideos');
		$this->view->videos = $cache->showAllVideos();


		# Chargement des variables dans la vue
		$this->view->config = $this->config;
		$this->view->titre = 'Vidéos';
		$this->view->head 	= $this->head;
		echo $this->view->render();
	}
}